home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / 1995.02 / 000004_vieth@thphy.uni-duesseldorf.de_Thu Feb 2 17:59:02 1995.msg < prev    next >
Internet Message Format  |  1995-02-28  |  23KB

  1. Received: from thphy.uni-duesseldorf.de (xerxes.thphy.uni-duesseldorf.de) by cs.umb.edu with SMTP id AA29987
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Thu, 2 Feb 1995 14:57:59 -0500
  3. Received: from macbeth.thphy.uni-duesseldorf.de.thphy.uni-duesseldorf.de by thphy.uni-duesseldorf.de (4.1/SMI-4.1)
  4.     id AA02230; Thu, 2 Feb 95 16:59:02 +0100
  5. Date: Thu, 2 Feb 95 16:59:02 +0100
  6. From: vieth@xerxes.thphy.uni-duesseldorf.de
  7. Message-Id: <9502021559.AA02230@thphy.uni-duesseldorf.de>
  8. Received: by macbeth.thphy.uni-duesseldorf.de.thphy.uni-duesseldorf.de (4.1/SMI-4.1)
  9.     id AA01451; Thu, 2 Feb 95 16:58:15 +0100
  10. To: tex-k@cs.umb.edu
  11. Cc: hobby@research.att.com
  12. Subject: File: web2c.mp.shar
  13.  
  14. #!/bin/sh
  15. # This is a shell archive (produced by GNU shar 4.0).
  16. # To extract the files from this archive, save it to some FILE, remove
  17. # everything before the `!/bin/sh' line above, then type `sh FILE'.
  18. #
  19. # Made on 1995-02-02 15:40 MET by <vieth@macbeth>.
  20. # Source directory was `/ush/macbeth/vieth/tmp/mp-dist'.
  21. #
  22. # Existing files will *not* be overwritten unless `-c' is specified.
  23. #
  24. # This shar contains:
  25. # length mode       name
  26. # ------ ---------- ------------------------------------------
  27. #    472 -rw-r--r-- web2c/mp/coerce.add
  28. #    477 -rw-r--r-- web2c/mp/convert
  29. #    543 -rw-r--r-- web2c/mp/small.sed
  30. #    625 -rw-r--r-- web2c/mp/trap.sed
  31. #    304 -rw-r--r-- web2c/mp/trapenv
  32. #   7694 -rw-r--r-- web2c/mp/Makefile.in
  33. #   3472 -rw-r--r-- web2c/mpware/Makefile.in
  34. #   1196 -rw-r--r-- web2c/mpware/dmp.h.in
  35. #
  36. touch -am 1231235999 $$.touch >/dev/null 2>&1
  37. if test ! -f 1231235999 && test -f $$.touch; then
  38.   shar_touch=touch
  39. else
  40.   shar_touch=:
  41.   echo 'WARNING: not restoring timestamps'
  42. fi
  43. rm -f 1231235999 $$.touch
  44. #
  45. # ============= web2c/mp/coerce.add ==============
  46. if test ! -d 'web2c'; then
  47.   echo 'x - creating directory web2c'
  48.   mkdir 'web2c'
  49. fi
  50. if test ! -d 'web2c/mp'; then
  51.   echo 'x - creating directory web2c/mp'
  52.   mkdir 'web2c/mp'
  53. fi
  54. if test -f 'web2c/mp/coerce.add' && test X"$1" != X"-c"; then
  55.   echo 'x - skipping web2c/mp/coerce.add (File already exists)'
  56. else
  57.   echo 'x - extracting web2c/mp/coerce.add (text)'
  58.   sed 's/^X//' << 'SHAR_EOF' > 'web2c/mp/coerce.add' &&
  59. /* Some definitions that get appended to the `coerce.h' file that web2c
  60. X   outputs.  */
  61. X
  62. /* The C compiler ignores most unnecessary casts (i.e., casts of
  63. X   something to its own type).  However, for structures, it doesn't.
  64. X   Therefore, we have to redefine these macros so they don't cast
  65. X   cast their argument (of type memoryword or fourquarters,
  66. X   respectively).  */
  67. #undef    printword
  68. #define    printword(x)    zprintword (x)
  69. X
  70. #undef    tfmqqqq
  71. #define tfmqqqq(x)    ztfmqqqq (x)
  72. SHAR_EOF
  73.   $shar_touch -am 1012200690 'web2c/mp/coerce.add' &&
  74.   chmod 0644 'web2c/mp/coerce.add' ||
  75.   echo 'restore of web2c/mp/coerce.add failed'
  76.   shar_count="`wc -c < 'web2c/mp/coerce.add'`"
  77.   test 472 -eq "$shar_count" ||
  78.     echo "web2c/mp/coerce.add: original size 472, current size $shar_count"
  79. fi
  80. # ============= web2c/mp/convert ==============
  81. if test -f 'web2c/mp/convert' && test X"$1" != X"-c"; then
  82.   echo 'x - skipping web2c/mp/convert (File already exists)'
  83. else
  84.   echo 'x - extracting web2c/mp/convert (text)'
  85.   sed 's/^X//' << 'SHAR_EOF' > 'web2c/mp/convert' &&
  86. #!/bin/sh
  87. # Convert Metafont to C.
  88. X
  89. sed=sed
  90. X
  91. $sed -e '
  92. X    : again
  93. X    /\.$/{
  94. X        N
  95. X        s/\.\n/\
  96. X./
  97. X        t again
  98. X    }
  99. X    s/\.hh/.hhfield/g
  100. X    s/\.lh/.lhfield/g
  101. ' ../lib/common.defines ../lib/texmf.defines mp.p \
  102. X    | ../web2c/web2c -htexmf.h -m \
  103. X    | $sed -e '
  104. X        s/else write/else\
  105. write/
  106. X        s/ maxcoef\( *[^( ]\)/ lmaxcoef\1/g
  107. X        s/ b1/ lb1/g
  108. X        s/ b2/ lb2/g
  109. X        s/ b3/ lb3/g
  110. X      ' \
  111. X    | ../web2c/fixwrites \
  112. X    | ../web2c/splitup mp
  113. X
  114. cat coerce.h coerce.add >xcoerce.h
  115. mv xcoerce.h coerce.h
  116. SHAR_EOF
  117.   $shar_touch -am 0130151095 'web2c/mp/convert' &&
  118.   chmod 0644 'web2c/mp/convert' ||
  119.   echo 'restore of web2c/mp/convert failed'
  120.   shar_count="`wc -c < 'web2c/mp/convert'`"
  121.   test 477 -eq "$shar_count" ||
  122.     echo "web2c/mp/convert: original size 477, current size $shar_count"
  123. fi
  124. # ============= web2c/mp/small.sed ==============
  125. if test -f 'web2c/mp/small.sed' && test X"$1" != X"-c"; then
  126.   echo 'x - skipping web2c/mp/small.sed (File already exists)'
  127. else
  128.   echo 'x - extracting web2c/mp/small.sed (text)'
  129.   sed 's/^X//' << 'SHAR_EOF' > 'web2c/mp/small.sed' &&
  130. s/bistack_size=1500/bistack_size=785/
  131. s/buf_size=3000/buf_size=500/
  132. s/hash_prime=7919/hash_prime=1777/
  133. s/hash_size=9500/hash_size=2100/
  134. s/lig_table_size=15000/lig_table_size=5000/
  135. s/max_halfword==262143/max_halfword==65535/
  136. s/max_internal=300/max_internal=100/
  137. s/max_kerns=2500/max_kerns=500/
  138. s/max_strings=7500/max_strings=3000/
  139. s/mem_max=262140/mem_max=60000/
  140. s/mem_top=262140/mem_top=60000/
  141. s/path_size=1000/path_size=300/
  142. s/pool_size=100000/pool_size=36000/
  143. s/stack_size=300/stack_size=30/
  144. s/string_vacancies=74000/string_vacancies=10000/
  145. SHAR_EOF
  146.   $shar_touch -am 0201162595 'web2c/mp/small.sed' &&
  147.   chmod 0644 'web2c/mp/small.sed' ||
  148.   echo 'restore of web2c/mp/small.sed failed'
  149.   shar_count="`wc -c < 'web2c/mp/small.sed'`"
  150.   test 543 -eq "$shar_count" ||
  151.     echo "web2c/mp/small.sed: original size 543, current size $shar_count"
  152. fi
  153. # ============= web2c/mp/trap.sed ==============
  154. if test -f 'web2c/mp/trap.sed' && test X"$1" != X"-c"; then
  155.   echo 'x - skipping web2c/mp/trap.sed (File already exists)'
  156. else
  157.   echo 'x - extracting web2c/mp/trap.sed (text)'
  158.   sed 's/^X//' << 'SHAR_EOF' > 'web2c/mp/trap.sed' &&
  159. s/undef    TRAP/define TRAP/
  160. s/define memmax [0-9][0-9]*/define memmax 4500/
  161. s/define maxinternal [0-9][0-9]*/define maxinternal 100/
  162. s/define bufsize [0-9][0-9]*/define bufsize 500/
  163. s/define errorline [0-9][0-9]*/define errorline 64/
  164. s/define halferrorline [0-9][0-9]*/define halferrorline 32/
  165. s/define maxprintline [0-9][0-9]*/define maxprintline 72/
  166. s/define stacksize [0-9][0-9]*/define stacksize 30/
  167. s/define maxstrings [0-9][0-9]*/define maxstrings 2500/
  168. s/define stringvacancies [0-9][0-9]*/define stringvacancies 9000/
  169. s/define poolsize [0-9][0-9]*/define poolsize 32000/
  170. s/define memtop [0-9][0-9]*/define memtop 4500/
  171. SHAR_EOF
  172.   $shar_touch -am 0202104095 'web2c/mp/trap.sed' &&
  173.   chmod 0644 'web2c/mp/trap.sed' ||
  174.   echo 'restore of web2c/mp/trap.sed failed'
  175.   shar_count="`wc -c < 'web2c/mp/trap.sed'`"
  176.   test 625 -eq "$shar_count" ||
  177.     echo "web2c/mp/trap.sed: original size 625, current size $shar_count"
  178. fi
  179. # ============= web2c/mp/trapenv ==============
  180. if test -f 'web2c/mp/trapenv' && test X"$1" != X"-c"; then
  181.   echo 'x - skipping web2c/mp/trapenv (File already exists)'
  182. else
  183.   echo 'x - extracting web2c/mp/trapenv (text)'
  184.   sed 's/^X//' << 'SHAR_EOF' > 'web2c/mp/trapenv' &&
  185. #!/bin/sh
  186. # Make sure that files will be found in the current directory, so the
  187. # trap test will run properly.
  188. MPXCOMMAND=touch    # essentially a no-op
  189. X
  190. # trap.mf.
  191. MPINPUTS=.
  192. export MPINPUTS
  193. X
  194. # trap.tfm.
  195. TEXFONTS=.
  196. export TEXFONTS
  197. X
  198. # trap.base.
  199. MPMEMS=.
  200. export MPMEMS
  201. X
  202. # mf.pool.
  203. MPPOOL=.
  204. export MPPOOL
  205. SHAR_EOF
  206.   $shar_touch -am 0117122795 'web2c/mp/trapenv' &&
  207.   chmod 0644 'web2c/mp/trapenv' ||
  208.   echo 'restore of web2c/mp/trapenv failed'
  209.   shar_count="`wc -c < 'web2c/mp/trapenv'`"
  210.   test 304 -eq "$shar_count" ||
  211.     echo "web2c/mp/trapenv: original size 304, current size $shar_count"
  212. fi
  213. # ============= web2c/mp/Makefile.in ==============
  214. if test -f 'web2c/mp/Makefile.in' && test X"$1" != X"-c"; then
  215.   echo 'x - skipping web2c/mp/Makefile.in (File already exists)'
  216. else
  217.   echo 'x - extracting web2c/mp/Makefile.in (text)'
  218.   sed 's/^X//' << 'SHAR_EOF' > 'web2c/mp/Makefile.in' &&
  219. # Makefile for MetaPost.
  220. X
  221. SHELL = /bin/sh
  222. srcdir = @srcdir@
  223. VPATH = @srcdir@
  224. X
  225. # This is so kpathsea will get remade automatically if you change
  226. # something in it and recompile from the package directory.
  227. kpathsea_parent = ../..
  228. kpathsea_dir = $(kpathsea_parent)/kpathsea
  229. kpathsea = $(kpathsea_dir)/kpathsea.a
  230. X
  231. # Routines used everywhere.
  232. commondefines = $(srcdir)/../lib/common.defines $(srcdir)/../lib/texmf.defines
  233. commonh = $(srcdir)/../lib/config.h
  234. commono = ../lib/lib.a $(kpathsea)
  235. X
  236. # Routines used in TeX and Metafont.
  237. extrac = $(srcdir)/../lib/texmf.c
  238. extrah = $(srcdir)/../lib/texmf.h $(srcdir)/../lib/texmfmem.h mpd.h
  239. X
  240. # Routines used in TeX, Metafont, and BibTeX.
  241. fileioc = $(srcdir)/../lib/openinout.c
  242. fileioo = openinout.o
  243. X
  244. objs = $(fileioo) mp0.o mp1.o mp2.o mp3.o mp4.o mp5.o mp6.o mp7.o mp8.o \
  245. X       mp9.o mp10.o mpmath.o 
  246. iobjs = iextra.o inimp.o
  247. vobjs = vextra.o imp.o
  248. X
  249. # Where the test files are.
  250. mpsrcdir = $(srcdir)/../mp
  251. trapdir = $(mpsrcdir)/MPtrap
  252. X
  253. program = inimp virmp
  254. X
  255. CC = @CC@
  256. CFLAGS = -g
  257. CPPFLAGS = -DMP -I$(srcdir)/../lib -I../..
  258. X
  259. CCLD = $(CC)
  260. RANLIB = @RANLIB@
  261. LN = @LN_S@
  262. X
  263. LDFLAGS = $(CFLAGS) $(XLDFLAGS)
  264. libs = $(commono) $(LIBS)
  265. X
  266. LIBS = @LIBS@
  267. X
  268. INSTALL = @INSTALL@
  269. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  270. INSTALL_DATA = @INSTALL_DATA@
  271. X
  272. X
  273. # The mems we know how to make.
  274. mems = mp.mem mfmp.mem
  275. X
  276. # And how to make them.
  277. inimp = MPPOOL=. ./inimp
  278. X
  279. X
  280. # What to pass to submakes.
  281. makeargs=SHELL='$(SHELL)' CC='$(CC)' CFLAGS='$(CFLAGS)' \
  282. LDFLAGS='$(LDFLAGS)' LIBS='$(libs)' RANLIB='$(RANLIB)' LN='$(LN)'
  283. X
  284. X
  285. X.SUFFIXES:
  286. X.SUFFIXES: .o .c
  287. X.c.o:
  288. X    $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
  289. X
  290. X
  291. default: all
  292. all: $(program)
  293. triptrap: trapmp
  294. X
  295. X
  296. # MetaPost doesn't need window support.
  297. inimp: $(iobjs) $(objs) $(commono)
  298. X    $(CCLD) -o inimp $(LDFLAGS) $(iobjs) $(objs) $(libs)
  299. X
  300. virmp: $(vobjs) $(objs) $(commono)
  301. X    $(CCLD) -o virmp $(LDFLAGS) $(vobjs) $(objs) $(libs)
  302. X
  303. # This target is only for testing arithmetic routines.  Run timemath with
  304. # no arguments and use the results printed on standard output to decide if
  305. # the external routines used when `FIXPT' is not defined in site.h work
  306. # properly and run faster than the standard arithmetic routines.
  307. X
  308. timemath: time.o cmath.o pmath.o mathtest.o $(objs) $(commono)
  309. X    $(CCLD) $(LDFLAGS) -o timemath time.o cmath.o pmath.o mathtest.o
  310. X
  311. time.o:     test_mpd.h mp.h
  312. mathtest.o: test_mpd.h mp.h
  313. pmath.o:   test_mpd.h mp.h
  314. cmath.o:   test_mpd.h mp.h
  315. X    rm -f stamp-orig stamp-trap
  316. X    cp test_mpd.h mpd.h
  317. X    cp mpmath.c cmath.c
  318. X    $(CC) $(CFLAGS) -c cmath.c
  319. X
  320. X
  321. check: run-trap
  322. run-trap: trapmp trapf.tfm
  323. X    rm -f mtrap.mp
  324. X    -$(LN) $(trapdir)/mtrap.mp .
  325. X    -$(SHELL) -c '. ./trapenv; \
  326. X      ./trapmp mtrap > /dev/null 2>&1'
  327. X    -diff $(trapdir)/mtrap.log mtrap.log
  328. X    -diff $(trapdir)/mtrap.0 mtrap.0
  329. X    -diff $(trapdir)/mtrap.1 mtrap.1
  330. X    -diff $(trapdir)/writeo writeo
  331. X    -diff $(trapdir)/writeo.2 writeo.2
  332. X    rm -f trap.mp
  333. X    rm -f trap.mpx
  334. X    -$(LN) $(trapdir)/trap.mp .
  335. X    -$(LN) $(trapdir)/trap.mpx .
  336. X    touch trap.mpx
  337. X    -$(SHELL) -c '. ./trapenv; \
  338. X     ./trapmp < $(trapdir)/trap1.in >/dev/null 2>&1'
  339. X    mv trap.log  trapin.log
  340. X    -diff $(trapdir)/trapin.log trapin.log
  341. X    -$(SHELL) -c '. ./trapenv; \
  342. X     ./trapmp < $(trapdir)/trap2.in > trap.fot'
  343. X    -diff $(trapdir)/trap.log trap.log
  344. X    -diff $(trapdir)/trap.fot trap.fot
  345. X    -diff $(trapdir)/trap.5 trap.5
  346. X    -diff $(trapdir)/trap.6 trap.6
  347. X    -diff $(trapdir)/trap.148 trap.148
  348. X    -diff $(trapdir)/trap.149 trap.149
  349. X    -diff $(trapdir)/trap.150 trap.150
  350. X    -diff $(trapdir)/trap.151 trap.151
  351. X    -diff $(trapdir)/trap.197 trap.197
  352. X    -diff $(trapdir)/trap.200 trap.200
  353. X    ../fontutil/tftopl trap.tfm trap.pl
  354. X    -diff $(trapdir)/trap.pl trap.pl
  355. X
  356. trapf.tfm: 
  357. X    ../fontutil/pltotf $(trapdir)/trapf.pl trapf.tfm
  358. X        
  359. # Make mem files automatically.
  360. mems: $(mems)
  361. X
  362. mp.mem: inimp
  363. X    $(inimp) 'plain; dump'
  364. X    mv plain.mem mp.mem
  365. X    mv plain.log mp.log
  366. X
  367. mfmp.mem: inimp
  368. X    $(inimp) 'mfplain; dump'
  369. X    mv mfplain.mem mfmp.mem
  370. X    mv mfplain.log mfmp.log
  371. X
  372. # The `ini_to_trap' script changes mpd.h, instead of the change file, so
  373. # retangling is not necessary.  After changing constants, making a
  374. # trapmp means making an inimp.
  375. trapmp: stamp-trap
  376. X    $(MAKE) $(makeargs) inimp
  377. X    mv inimp trapmp
  378. X
  379. stamp-trap: mpd.h $(mpsrcdir)/trap.sed
  380. X    rm -f *.o temp
  381. X    sed -f $(mpsrcdir)/trap.sed < mpd.h > temp
  382. X    mv mpd.h mpd.h.bak
  383. X    mv temp mpd.h
  384. X    touch stamp-trap
  385. X
  386. clean-trap:
  387. X    rm -f *.o mpd.h trapmp stamp-trap
  388. # Don't reinstall mpd.h with the test constants.
  389. X    if grep 'memmax 4500' mpd.h.bak >/dev/null 2>&1; then \
  390. X          rm -f mpd.h*; else mv mpd.h.bak mpd.h; fi
  391. X
  392. mp.p mp.pool: mp.web cmp.ch
  393. X    ../web/tangle mp.web cmp.ch
  394. X
  395. cmp.ch: $(mpsrcdir)/mp.ch
  396. X    rm -f cmp.ch
  397. X    cp $(mpsrcdir)/mp.ch cmp.ch
  398. X
  399. # The convert script produces the following files:
  400. mp0.c mp1.c mp2.c mp3.c mp4.c mp5.c mp6.c mp7.c mp8.c mp9.c mp10.c \
  401. imp.c coerce.h mpd.h: mp.p coerce.add $(commondefines)
  402. X    $(SHELL) $(mpsrcdir)/convert
  403. X    touch mpd.h
  404. X
  405. # The (hand-coded) file $(extrac) and the (generated) file itex.c have
  406. # #ifdefs for INIMP, so we compile them differently
  407. iextra.o: iextra.c $(commonh) $(extrah)
  408. X    $(CC) $(CPPFLAGS) -DINIMP -DINI $(CFLAGS) -c iextra.c
  409. X
  410. inimp.o: inimp.c $(commonh) $(extrah)
  411. X    $(CC) $(CPPFLAGS) -DINIMP $(CFLAGS) -c inimp.c 
  412. X
  413. # MetaPost specific stuff in openinout.c needs some extra symbols
  414. openinout.o: openinout.c
  415. X    $(CC) $(CPPFLAGS) -DMPXCOMMAND='"$(bindir)/makempx"' \
  416. X    -DTROFFMPX='"$(bindir)/troffmpx"' $(CFLAGS) -c openinout.c
  417. X
  418. # Avoid compiling files in another directory.
  419. iextra.c: $(extrac)
  420. X    rm -f iextra.c
  421. X    $(LN) $(extrac) iextra.c
  422. X
  423. inimp.c: imp.c
  424. X    rm -f inimp.c
  425. X    $(LN) imp.c inimp.c
  426. X
  427. vextra.c: $(extrac)
  428. X    rm -f vextra.c
  429. X    $(LN) $(extrac) vextra.c
  430. X
  431. openinout.c: $(fileioc)
  432. X    rm -f openinout.c
  433. X    $(LN) $(fileioc) openinout.c
  434. X
  435. $(iobjs) $(vobjs) $(objs): $(commonh) $(extrah)
  436. mpmath.o: mpd.h $(extrah)
  437. X
  438. mp0.o: mp0.c
  439. mp1.o: mp1.c
  440. mp2.o: mp2.c
  441. mp3.o: mp3.c
  442. mp4.o: mp4.c
  443. mp5.o: mp5.c
  444. mp6.o: mp6.c
  445. mp7.o: mp7.c
  446. mp8.o: mp8.c
  447. mp9.o: mp9.c
  448. mp10.o: mp10.c
  449. X
  450. X
  451. Makefile: Makefile.in ../config.status
  452. X    (cd ..; sh config.status)
  453. X
  454. c-sources: mpd.h
  455. X.PHONY: c-sources
  456. X
  457. install: install-exec install-data
  458. X
  459. install-exec: all
  460. X    for p in $(program); do $(INSTALL_PROGRAM) $$p $(bindir)/$$p; done
  461. X
  462. install-data: mp.pool
  463. X    $(SHELL) $(srcdir)/../../mkdirchain $(mppooldir)
  464. X    -if test -s mp.pool; then \
  465. X      $(INSTALL_DATA) mp.pool $(mppooldir)/mp.pool; else true; fi
  466. X
  467. TAGS: *.c *.h
  468. X    etags -t *.c *.h
  469. X
  470. X
  471. mostlyclean::
  472. X    rm -f *.o $(program) $(lib) $(programs)
  473. X
  474. clean:: mostlyclean
  475. X    rm -f *.dvi
  476. X
  477. distclean:: clean
  478. X    rm -f Makefile config.status c-auto.h *.pool
  479. X
  480. # Although we can remake configure and c-auto.h.in, we don't remove
  481. # them, since many people may lack Autoconf.  Use configclean for that.
  482. realclean:: distclean
  483. X    rm -f TAGS *.info*
  484. X
  485. extraclean::
  486. X    rm -f *.aux *.bak *.bbl *.blg *.dvi *.log *.orig *.pl *.rej
  487. X    rm -f *.i *.s *.tfm *.vf *.vpl *\#* *gf *pk *~
  488. X    rm -f CONTENTS.tex a.out core mpout.* patch* texput.*
  489. X
  490. configclean:
  491. X    rm -f configure c-auto.h.in c-auto.h
  492. X
  493. X
  494. # Prevent GNU make 3 from overflowing arg limit on system V.
  495. X.NOEXPORT:
  496. X
  497. # Be careful not to remove trap.* as we want to keep trap.sed.
  498. mostlyclean::
  499. X    rm -f stamp-* trapmp
  500. X    rm -f mpd.h mpd.h.bak coerce.h *.log *.mem
  501. X    rm -f trapf.tfm mtrap.mp mtrap.0 mtrap.1 writeo writeo.2
  502. X    rm -f trap.mp trap.mpx trap.fot trap.tfm trap.pl trap.ps
  503. X    rm -f trap.0 trap.5 trap.6 trap.95 trap.96 trap.97 
  504. X    rm -f trap.98 trap.99 trap.100 trap.101 trap.102 trap.103 
  505. X    rm -f trap.104 trap.105 trap.106 trap.107 trap.108 trap.109
  506. X    rm -f trap.148 trap.149 trap.150 trap.151 trap.197 trap.200 
  507. X
  508. # Be careful not to remove *.c *.h as we have to keep some files.
  509. clean::
  510. X    rm -f *.p mpd.h mpd.h.bak coerce.h 
  511. X    rm -f imp.c inimp.c iextra.c vextra.c openinout.c mp0.c mp1.c 
  512. X    rm -f mp2.c mp3.c mp4.c mp5.c mp6.c mp7.c mp8.c mp9.c mp10.c 
  513. X
  514. distclean::
  515. X    rm -f cmp.ch
  516. X
  517. extraclean::
  518. X
  519. SHAR_EOF
  520.   $shar_touch -am 0202152195 'web2c/mp/Makefile.in' &&
  521.   chmod 0644 'web2c/mp/Makefile.in' ||
  522.   echo 'restore of web2c/mp/Makefile.in failed'
  523.   shar_count="`wc -c < 'web2c/mp/Makefile.in'`"
  524.   test 7694 -eq "$shar_count" ||
  525.     echo "web2c/mp/Makefile.in: original size 7694, current size $shar_count"
  526. fi
  527. # ============= web2c/mpware/Makefile.in ==============
  528. if test ! -d 'web2c/mpware'; then
  529.   echo 'x - creating directory web2c/mpware'
  530.   mkdir 'web2c/mpware'
  531. fi
  532. if test -f 'web2c/mpware/Makefile.in' && test X"$1" != X"-c"; then
  533.   echo 'x - skipping web2c/mpware/Makefile.in (File already exists)'
  534. else
  535.   echo 'x - extracting web2c/mpware/Makefile.in (text)'
  536.   sed 's/^X//' << 'SHAR_EOF' > 'web2c/mpware/Makefile.in' &&
  537. # Makefile for the  MetaPost support programs.
  538. X
  539. SHELL = /bin/sh
  540. srcdir = @srcdir@
  541. VPATH = @srcdir@
  542. X
  543. # This is so kpathsea will get remade automatically if you change
  544. # something in it and recompile from the package directory.
  545. kpathsea_parent = ../..
  546. kpathsea_dir = $(kpathsea_parent)/kpathsea
  547. kpathsea = $(kpathsea_dir)/kpathsea.a
  548. X
  549. # Routines used everywhere.
  550. commondefines = $(srcdir)/../lib/common.defines
  551. commonh = $(srcdir)/../lib/config.h $(kpathsea_dir)/paths.h
  552. commono = ../lib/lib.a $(kpathsea)
  553. X
  554. c_autoh = $(srcdir)/../lib/c-auto.h
  555. X
  556. program = makempx troffmpx mptotex mptotr dvitomp dmp newer
  557. X
  558. CC = @CC@
  559. CFLAGS = -g
  560. CPPFLAGS = -I$(srcdir)/../lib -I../..
  561. X
  562. CCLD = $(CC)
  563. LDFLAGS = $(CFLAGS) $(XLDFLAGS)
  564. LIBS = @LIBS@ $(extralibs)
  565. libs = $(commono) $(LIBS)
  566. X
  567. INSTALL = @INSTALL@
  568. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  569. X
  570. X
  571. X.SUFFIXES:
  572. X.SUFFIXES: .o .c .p .ch
  573. X.p.c:
  574. X    $(SHELL) $(srcdir)/../lib/convert $*.p $*.c
  575. X.ch.p:
  576. X    ../web/tangle $*.web $*.ch
  577. X.c.o:
  578. X    $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
  579. X
  580. X
  581. default: all
  582. all: $(program) 
  583. X
  584. # MAKEMPX
  585. makempx: makempx.in
  586. X    sed -e 's,@BINDIR@,$(bindir),g' \
  587. X    <$(srcdir)/makempx.in >$@
  588. X    -chmod a+x $@
  589. X
  590. # TROFFMPX
  591. troffmpx: troffmpx.in
  592. X    sed -e 's,@BINDIR@,$(bindir),g' \
  593. X    <$(srcdir)/troffmpx.in >$@
  594. X    -chmod a+x $@    
  595. X
  596. # MPtoTEX
  597. mptotex: mptotex.o
  598. X    $(CCLD) $(CFLAGS) -o mptotex mptotex.o
  599. X
  600. # MPtoTR
  601. mptotr: mptotr.o
  602. X    $(CCLD) $(CFLAGS) -o mptotr mptotr.o
  603. X
  604. # DVItoMP
  605. dvitomp: dvitomp.o $(commono)
  606. X    $(CCLD)  -o dvitomp $(LDFLAGS) dvitomp.o $(libs)
  607. dvitomp.o:    dvitomp.c $(commonh)
  608. dvitomp.c:    dvitomp.p $(commondefines)
  609. dvitomp.p:    dvitomp.web dvitomp.ch
  610. X
  611. # DMP
  612. dmp: dmp.o
  613. X    $(CCLD) $(CFLAGS) -o dmp dmp.o -lm
  614. X
  615. dmp.o: dmp.c dmp.h $(c_autoh)
  616. X
  617. dmp.h: dmp.h.in
  618. X    sed -e 's,@LIBDIR@,$(libdir),g' \
  619. X    <$(srcdir)/dmp.h.in >$@
  620. # newer
  621. newer: newer.o $(c_autoh)
  622. X    $(CCLD) $(CFLAGS) -o newer newer.o
  623. X
  624. X
  625. # Don't test mptotr because its source file is identical to mptotex.c
  626. # except for a few string constants.
  627. # This will abort if either diff returns nonzero exit status
  628. # otherwise the test is considered passed.
  629. run-triptrap: mptotex newer
  630. X    ./mptotex testex.mp | diff testex.tex -
  631. X    sed '16s/^%//' <testex.mp >testex1
  632. X    -mptotex testex1 >/dev/null 2>testex2
  633. X    sed '17s/^%//' <testex.mp >testex1
  634. X    -mptotex testex1 >/dev/null 2>>testex2
  635. X    sed '18s/^%//' <testex.mp >testex1
  636. X    -mptotex testex1 >/dev/null 2>>testex2
  637. X    sed '19s/^%//' <testex.mp >testex1
  638. X    -mptotex testex1 >/dev/null 2>>testex2
  639. X    sed '20s/^%//' <testex.mp >testex1
  640. X    -mptotex testex1 >/dev/null 2>>testex2
  641. X    diff testex.err testex2
  642. X
  643. clean-triptrap:
  644. X    rm -f testex1 testex2
  645. X
  646. X
  647. Makefile: Makefile.in ../config.status
  648. X    (cd ..; sh config.status)
  649. X
  650. X
  651. c-sources: dvitomp.c
  652. X.PHONY: c-sources
  653. X
  654. install install-exec: all
  655. X    for p in $(program); do $(INSTALL_PROGRAM) $$p $(bindir)/$$p; done
  656. install-data:
  657. X
  658. X
  659. TAGS: *.c *.h
  660. X    etags -t *.c *.h
  661. X
  662. X
  663. mostlyclean::
  664. X    rm -f *.o $(program) $(lib) $(programs)
  665. X
  666. clean:: mostlyclean
  667. X    rm -f *.dvi *.pool
  668. X
  669. distclean:: clean
  670. X    rm -f Makefile config.status c-auto.h
  671. X
  672. # Although we can remake configure and c-auto.h.in, we don't remove
  673. # them, since many people may lack Autoconf.  Use configclean for that.
  674. realclean:: distclean
  675. X    rm -f TAGS *.info*
  676. X
  677. extraclean::
  678. X    rm -f *.aux *.bak *.bbl *.blg *.dvi *.log *.orig *.pl *.rej
  679. X    rm -f *.i *.s *.tfm *.vf *.vpl *\#* *gf *pk *~
  680. X    rm -f CONTENTS.tex a.out core mfput.* patch* texput.*
  681. X
  682. configclean:
  683. X    rm -f configure c-auto.h.in c-auto.h
  684. X
  685. X
  686. # Prevent GNU make 3 from overflowing arg limit on system V.
  687. X.NOEXPORT:
  688. X
  689. clean::
  690. X    rm -f dmp.h dvitomp.p dvitomp.c dvitomp.h
  691. SHAR_EOF
  692.   $shar_touch -am 0202145495 'web2c/mpware/Makefile.in' &&
  693.   chmod 0644 'web2c/mpware/Makefile.in' ||
  694.   echo 'restore of web2c/mpware/Makefile.in failed'
  695.   shar_count="`wc -c < 'web2c/mpware/Makefile.in'`"
  696.   test 3472 -eq "$shar_count" ||
  697.     echo "web2c/mpware/Makefile.in: original size 3472, current size $shar_count"
  698. fi
  699. # ============= web2c/mpware/dmp.h.in ==============
  700. if test -f 'web2c/mpware/dmp.h.in' && test X"$1" != X"-c"; then
  701.   echo 'x - skipping web2c/mpware/dmp.h.in (File already exists)'
  702. else
  703.   echo 'x - extracting web2c/mpware/dmp.h.in (text)'
  704.   sed 's/^X//' << 'SHAR_EOF' > 'web2c/mpware/dmp.h.in' &&
  705. /*******************************************************************
  706. X  The following definitions are unique to MetaPost
  707. *******************************************************************/
  708. X
  709. /* TODO: adapt this for kpathsea-2.6: 
  710. X
  711. X   This header a file is temporary kludge to allow compiling dmp.c
  712. X   after replacing the MetaPost specific site.h (based on an older
  713. X   version of web2c) by the generic c-auto.h from web2c-6.1.
  714. X
  715. X   It defines some default search paths that should be replaced 
  716. X   by the generic search paths defined in $TEXMF/web2c/texmf.cnf 
  717. X   after adapting dmp.c to do path searching using kpathsea-2.6.
  718. X
  719. X   Note that MPPOOL has been replaced by MPLIB in dmp.c to allow
  720. X   for better organization of the MetaPost files in the $TEXMF
  721. X   directory tree.
  722. */    
  723. X  
  724. /* Where dmp looks for TFM files */
  725. #define TEXFONTS    "@LIBDIR@/texmf/fonts/adobe/times/tfm:" \
  726. X            "@LIBDIR@/texmf/fonts/adobe/symbol/tfm:"
  727. X
  728. /* Where dmp looks for troff support files 
  729. X   (trfonts.map, trchar.adj, etc.) */
  730. #define MPLIB        "@LIBDIR@/texmf/mplib"
  731. X
  732. /* Where dmp looks for troff font tables */
  733. #define TRFONTS        "/usr/lib/font/devpost"
  734. X
  735. /************ End of MetaPost stuff *******************************/
  736. SHAR_EOF
  737.   $shar_touch -am 0201114195 'web2c/mpware/dmp.h.in' &&
  738.   chmod 0644 'web2c/mpware/dmp.h.in' ||
  739.   echo 'restore of web2c/mpware/dmp.h.in failed'
  740.   shar_count="`wc -c < 'web2c/mpware/dmp.h.in'`"
  741.   test 1196 -eq "$shar_count" ||
  742.     echo "web2c/mpware/dmp.h.in: original size 1196, current size $shar_count"
  743. fi
  744. exit 0